import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/layout'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home',
    component: Layout,
    children: [
      {
        path: 'home',
        name: '首页-云客服监控',
        meta: {
          activeName: '1'
        },
        component: () => import('@/views/home')
      },
      {
        path: 'ykfdmt',
        name: '云客服多媒体',
        meta: {
          activeName: '2'
        },
        component: () => import('@/views/ykfdmt')
      },
      {
        path: 'jrykf',
        name: '金融云客服外呼营销系统',
        meta: {
          activeName: '3'
        },
        component: () => import('@/views/jrykf')
      },
      {
        path: 'bbfx',
        name: '云客服分析报表',
        meta: {
          activeName: '4'
        },
        component: () => import('@/views/bbfx')
      },
      {
        path: 'jrycrm',
        name: '金融云客服CRM系统',
        meta: {
          activeName: '5'
        },
        component: () => import('@/views/jrycrm')
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
